<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<meta name="renderer" content="webkit" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>科普文章</title>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/normalize.css" type="text/css" />
<link rel="stylesheet" href="css/secondary.css" type="text/css" />
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="js/Kunyi.Respond.min.js" ></script><![endif]-->
<script language="javascript" type="text/javascript" src="js/KunyiHTML5.min.js"></script>
<script language="javascript" type="text/javascript" src="js/Kunyilibrary.js"></script>
</head>
<body>
<script language="javascript" type="text/javascript" src="js/Kunyi.Init.js"></script>

<section class="BaseMark">
	<div class="bread">您所在的位置<span><a href="index.jsp">首页</a>><a href="news.jsp">科普文章</a></span></div>
    <div class="baseLeft">
    	<div class="title title05_19">科普文章</div>
          <div class="newsMenu">       
<ul><li class="first active"><a href="news.jsp" title="科普文章"><em>科普文章</em></a></li>
        
</ul>
        </div>
        <div class="tools"><a href="http://127.0.0.1:8080/witmed/front/index.jsp" target="_blank">
        <img src="images/ico_001.gif" width="52" height="52"><em>互联智慧分诊平台</em></a>
        <a style="margin-right:0;" href="http://www.cq12320.cn/">
        <img src="images/ico_002.gif" width="52" height="52"><em><span>12320</span> 投诉平台</em></a>
        <a href="http://61.49.18.120:9090/unit/index"><img src="images/ico_003.gif" width="52" height="52"><em>卫健委</em></a>
        <a style="margin-right:0;" href="../back/userBackindex.jsp" class="last">
        <img src="images/ico_004.gif" width="52" height="52"><em>用户个人信息查询</em></a>
        <div class="clear"></div></div>
    </div>
    
   		<header style=width:100%;position:relative;height:50px;><div class="topHidden"></div>
    	<div class="searchBase"  >
    	<div class="itemBase"><div class="divType" style="background: url(../front/images/ico_005.jpg) 84px center no-repeat;text-indent: 20px;cursor: pointer;" data-state="0">全站内容</div>
    	<ul><li data-id="1">全部文章</li><li data-id="2">医生查找</li></ul>
    	
    	
    	 </div>
		<form method="get" onSubmit="return Kunyi.CheckSearchForm()" style="margin-top: -50px; width: 300px;
    margin-left: 115px">
		<input type="hidden" id="Type" name="Type" value="1" />
		<input type="text" style="border:0px;width: 300px;height: 34px; margin-top: 6px;" name="SearchWords" placeholder="请输入您要查找内容的关键字"  value="" autocomplete="off" onFocus="Kunyi.cls(event)" onBlur="Kunyi.res(event)"  maxlength="28" id="SearchWords" />
		<input type="submit" value="搜索" class="boxsub animated" id="search-button"/>
		</form>
		</div></header>
		
    <div class="baseRight">
    	<div class="title01">科普文章</div>
        <div class="title02">
            <a href="news.jsp?D=1" id="DateAscOrDesc" class="currentTime">发布时间排序</a>
            <a href="news.jsp?H=1" id="HitAscOrDesc">阅览次数排序</a>
            <div class="itemBase">
            <!-- 分页显示条数选择 -->
          <select style="width:90px" id="select-pageSize">
			<option value="2">2条/页</option>
			<option value="5">5条/页</option>
			<option value="10">10条/页</option>
		  </select>
                        
           </div>
            <span class="count">共发布文章<em id="EMCount">1633</em>篇</span>
        </div>
        <div class="clear"></div>
        <div class="newList" id="articleList">
        	<!-- <ul>
        	<li>
        	<div class="headLines"><a href="newslist.html" title="互联智慧疼痛医联体全面启动" data-articleid="" target="_blank" class="title">互联智慧疼痛医联体全面启动</a><p>12月24日-25日，“国家临床重点专科?中日医院疼痛医联体”启动仪式、“医院标题互联智慧疼痛医联体”成立仪式暨疼痛诊疗规范化培训班在巩义市人民医院举行。</p></div>
			<div class="date"><h3>发布时间</h3><h4>2016/12/29</h4><p>阅览次数<span>280</span></p></div>
			<div class="listBtn"><a href="newslist.html" title="互联智慧疼痛医联体全面启动" target="_blank">进入</a></div>
			<div class="clear"></div>
			</li>
            </ul> -->
	    </div>
        
		<div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
                   <!--  <span>每页2条 共11条  第1/4页</span>
	                <a tabindex="0" class="first ui-corner-tl ui-corner-bl fg-button ui-button ui-state-default ui-state-disabled" id="DataTables_Table_0_first">首页</a>
	                <a tabindex="0" class="previous fg-button ui-button ui-state-default ui-state-disabled" id="DataTables_Table_0_previous">上一页</a>
	                <span>
		                <a tabindex="0" class="fg-button ui-button ui-state-default ui-state-disabled">1</a>
		                <a tabindex="0" class="fg-button ui-button ui-state-default">2</a>
		                <a tabindex="0" class="fg-button ui-button ui-state-default">3</a>
		                <a tabindex="0" class="fg-button ui-button ui-state-default">4</a>
		                <a tabindex="0" class="fg-button ui-button ui-state-default">5</a>
	                </span>
	                <a tabindex="0" class="next fg-button ui-button ui-state-default" id="DataTables_Table_0_next">下一页</a>
	                <a tabindex="0" class="last ui-corner-tr ui-corner-br fg-button ui-button ui-state-default" id="DataTables_Table_0_last">尾页</a> -->
         </div>
         
    </div>
    
    <div class="clear"></div>
</section><div class="BottomHidden"></div>
<div id="QRBase">
<div class="BaseMark">
    <div class="QRBase">
    <div class="QRList"><ul><li><div><img src="pic/pic_QR01.jpg" width="75" height="75"/><label>医院标题APP</label></div></li>
      <li><div><img src="pic/pic_QR02.jpg" width="75" height="75"/><label>健康之路APP</label></div></li>
      <li><div><img src="pic/pic_QR03.jpg" width="75" height="75"/><label>挂号网APP</label></div></li>
      <li><div><img src="pic/pic_QR04.jpg" width="75" height="75"/><label>预约挂号平台Androi客户端</label></div></li>
      <li><div><img src="pic/pic_QR05.jpg" width="75" height="75"/><label>预约挂号平台IOS客户端</label></div></li>
      <li><div><img src="pic/pic_QR06.jpg" width="75" height="75"/><label>预约挂号平台微信号</label></div></li>
      <li><div><img src="pic/pic_QR07.jpg" width="75" height="75"/><label>健康之路微信公众号</label></div></li>
      <li><div><img src="pic/pic_QR08.jpg" width="75" height="75"/><label>名医网微信公众号</label></div></li>
      <li><div><img src="pic/pic_QR09.jpg" width="75" height="75"/><label>挂号网微信公众号</label></div></li></ul><div class="clear"></div>
    </div><button class="QRClose animated">关闭</button>
    <div class="BottomHidden"></div></div>
    </div>
</div>
<footer><img src="images/ico_036.png" width="35" class="load" height="18" id="QRMark" />
<div class="menusBase">
<div class="BaseMark">
 <dl><dt><img src="images/ico_006.jpg" class="load" width="36" height="34" /><em>门诊服务</em><span>outpatient services</span></dt>
 <dd><a href="NewsDetail-449.html" title="预约流程" target="_blank">预约流程</a></dd><dd><a href="NewsDetail-448.html" title="门诊须知" target="_blank">门诊须知</a></dd><dd><a href="Article-57.html" title="院内导航" target="_blank">院内导航</a></dd></dl>
 <dl><dt><img src="images/ico_008.jpg" class="load" width="36" height="34" /><em>住院服务</em><span>hospitalized services</span></dt>
 <dd><a href="Article-56.html" title="住院须知" target="_blank">住院须知</a></dd><dd><a href="NewsDetail-461.html" title="检查须知" target="_blank">检查须知</a></dd><dd><a href="Article-56.html" title="住院清单" target="_blank">住院清单</a></dd></dl>
 <dl><dt><img src="images/ico_009.jpg" class="load" width="36" height="34" /><em>体检服务</em><span>examination services</span></dt>
 <dd><a href="NewsDetail-461.html" title="体检须知" target="_blank">体检须知</a></dd><dd><a href="NewsDetail-7684.html" title="体检套餐查询" target="_blank">体检套餐查询</a></dd><dd><a href="CheckupsInfo.html" title="体检报告查询" target="_blank">体检报告查询</a></dd></dl>
<a href="javascript:void(0)" id="BtnQRMore">点击扫描关注微信公众号更多二维码</a></div>
 
<div class="clear"></div>
 </div>
</div>

<div class="BottomHidden"></div>
<div class="DWeibo"> <a href="javascript:;" class="weibo" title="新浪微博">新浪官方微博</a><a href="javascript:;" class="tencent" title="腾讯微博">腾讯官方微博</a><div class="clear"></div></div>
<div class="urlHidden">  </div>
<div class="websiteInfo">
  <div class="info">主办单位：医院标题  &nbsp; &nbsp;综合服务电话：120&nbsp;&nbsp; &nbsp;急救中心电话：120 &nbsp; 传真：120 &nbsp; 地 址：地址地址地址 &nbsp;<br/> 版权所有：医院标题  </div>
  <ul><li class="first"><a href="jianjie.html" target="_blank">关于我们</a></li><li><a href="Declaration.html" target="_blank">法律声明</a></li><li><a href="SiteMap.html" target="_blank">网站地图</a></li><li><a href="Article-57.html" target="_blank">联系我们</a></li><li><a href="Complain.html" target="_blank">院长(信访)信箱</a></li></ul>
  <div class="clear"></div>
  <p> &copy;2020-<script language="javascript" type="text/javascript">document.write(new Date().getFullYear());</script>. All Rights Reserved. <a href="http://www.miitbeian.gov.cn/publish/query/indexFirst.action" target="_blank" >备案号0000001 </a></p>
   <select id="ddlLinks">
   <option value="0"><span>友情链接</span> HYPERLINK</option> <option value="http://www.cssmoban.com/">模板之家</option>
   </select>
</div>
</footer>
		<script language="javascript" type="text/javascript" src="js/Kunyi.Common.js"></script>
		<script language="javascript" type="text/javascript" src="js/Kunyi.Secondary.js"></script>
		<script type="text/javascript">
		$(document).ready(function(){
			sendAJAX(1);
		})
			
		// 首页
	 $(document).on("click","#DataTables_Table_0_first",function(){
		 // 获取当前页码
		 var pageNum = $("#pageInfo").data("pagenum");	 
		 // 判断
		 if(pageNum == 1){
			 alert("已经是首页");		
		 }else{
			 // 调用发送请求方法,参数页码
			 sendAJAX(pageNum);
		 }	
	 });
	 
	 // 上一页
	 $(document).on("click","#DataTables_Table_0_previous",function(){
		 // 获取当前页码
		 var pageNum = $("#pageInfo").data("pagenum") - 1;
		 
		 if(pageNum < 1){
			 // 拦截请求
			 alert("已经是第一页");
		 }else{
			// 调用发送请求方法,参数页码
			 sendAJAX(pageNum);
		 }
 	})
 	
 	 // 下一页
	 $(document).on("click","#DataTables_Table_0_next",function(){
		 // 获取当前页码
		 var pageNum = eval($("#pageInfo").data("pagenum") + 1);		 
		 // 获取最大页码
		 var pages = $("#pageInfo").data("pages");
		 
		 if(pageNum > pages){
			 // 拦截请求
			 alert("已经是最后一页");
		 }else{
			// 调用发送请求方法,参数页码
			 sendAJAX(pageNum);
		 }
 	})
 	
 	 // 尾页
	 $(document).on("click","#DataTables_Table_0_last",function(){
		 // 获取当前页码
		 var pageNum = $("#pageInfo").data("pagenum");	 
		 // 获取最大页码
		 var pages = $("#pageInfo").data("pages");
	 
		 if(pageNum == pages){
			 // 拦截请求
			 alert("已经是尾页");
		 }
		 // 调用发送请求方法,参数页码
		 sendAJAX(pages);
		
 	  })
 	  
 	  // 页码
	 $(document).on("click",".current",function(){
		 // 获取当前显示的页码
		 var currentPageNum = $("#pageInfo").data("pagenum");	
		 // 获取当前超链接上表示的页码
		 var pageNum = $(this).text();
		 if(currentPageNum == pageNum){
			 return;
		 }
		// 调用发送请求方法,参数页码
		 sendAJAX(pageNum);		
 	  });
	 
	// 下拉框改变事件
	 $(document).on("change","#select-pageSize",function(){
		// 调用发送请求方法,参数页码
		 sendAJAX(1);		
 	  });
	 
	// 搜索事件
	 $(document).on("click","#search-button",function(){
		// 调用发送请求方法,参数页码
		sendAJAX(1);		
	 });
			
			// 发送AJAX请求 
	    function sendAJAX(pageNum){
	    	 // 获取显示记录数
			 var pageSize = $("#select-pageSize").val();
			 // 获取输入关键字
			 var SearchWords = $("#SearchWords").val();	
	    	 $.ajax({
	    		 async:true,
	    		 type:"get",
	    		 url:"${pageContext.request.contextPath}/ArticleServlet",
	    		 data:{
	    			 op:"searchByPage",
	    			 pageNum:pageNum,
	    			 pageSize:pageSize,
	    			 SearchWords:SearchWords
	    		 },
	    		 dataType:"json",
	    		 success:function(result){
	    			// 调用渲染函数
	    			 showData(result);
	    		 },
	    		 error:function(){
	    			 alert("异步请求失败!");
	    		 }
	    	 });
	    }
		
		function showData(result){
						var content = "";
						if(result.data.length==0){
							$(".newList").html("无相关数据");
							$("#DataTables_Table_0_paginate").html("");
						}else{
							for(var i = 0;i < result.data.length;i++){
								var article = result.data[i];
								console.log(article);
								content += 	"<ul>"+
								        	"<li>"+
								        	"<div class=\"headLines\"><a href=\"newslist.html\" title=\""+article.articleTitle+"\" data-articleid=\"\" target=\"_blank\" class=\"title\">"+article.articleTitle+"</a><p>"+article.articleContent+"</p></div>"+
											"<div class=\"date\"><h3>发布时间</h3><h4>"+article.articleTime.substring(0,10)+"</h4><p>作者<span>"+article.doctor.doctorName+"</span></p></div>"+
											"<div class=\"listBtn\"><a href=\"newslist.jsp?op=seachArticle&articleTitle="+article.articleTitle+"&articleId="+article.articleId+"\"  title=\""+article.articleTitle+"\" target=\"_blank\" >进入</a></div>"+
											"<div class=\"clear\"></div>"+
											"</li>"+
								            "</ul>";
							}
							$("#articleList").html(content);
							//window.location.href = "newslist.html?article="+article;
				 
				 // 渲染分页信息
				 var pageInfo = "";
				 pageInfo = "<span id=\"pageInfo\" data-pagenum=\""+result.pageNum+"\"  data-pages=\""+result.pages+"\">每页"+result.pageSize+"条 共"+result.total+"条  第"+result.pageNum+"/"+result.pages+"页</span>";
				 
				 if(result.pageNum == 1){
					 pageInfo += "<a tabindex=\"0\" class=\"first ui-corner-tl ui-corner-bl fg-button ui-button ui-state-default ui-state-disabled\" id=\"DataTables_Table_0_first\" disabled=\"disabled\">首页</a>";
					 pageInfo += "<a tabindex=\"0\" class=\"previous fg-button ui-button ui-state-default ui-state-disabled\" id=\"DataTables_Table_0_previous\" disabled=\"disabled\" >上一页</a>";
				 }else{
					 pageInfo += "<a tabindex=\"0\" class=\"first ui-corner-tl ui-corner-bl fg-button ui-button ui-state-default \" id=\"DataTables_Table_0_first\" >首页</a>";
					 pageInfo += "<a tabindex=\"0\" class=\"previous fg-button ui-button ui-state-default \" id=\"DataTables_Table_0_previous\"  >上一页</a>";
				 }
		
				 pageInfo += "<span>";
				 
				 for(var i = 1; i <= result.pages; i++){
					 // 设置当前的页面激活样式
					 if(result.pageNum == i){
						 pageInfo += "<a tabindex=\"0\" class=\"fg-button ui-button ui-state-default ui-state-disabled current\"  >"+i+"</a>";
					 } else{
						 pageInfo += "<a tabindex=\"0\" class=\"fg-button ui-button ui-state-default current\" >"+i+"</a>";
					 }
				 }
				 
				 pageInfo += "</span>";
				 
		 		if(result.pageNum == result.pages){
		 			 pageInfo += "<a tabindex=\"0\" class=\"next fg-button ui-button ui-state-default ui-state-disabled\" id=\"DataTables_Table_0_next\" disabled=\"disabled\">下一页</a>";
		 			 pageInfo += "<a tabindex=\"0\" class=\"last ui-corner-tr ui-corner-br fg-button ui-button ui-state-default ui-state-disabled\" id=\"DataTables_Table_0_last\" disabled=\"disabled\">尾页</a>";
				}else{
					 pageInfo += "<a tabindex=\"0\" class=\"next fg-button ui-button ui-state-default\" id=\"DataTables_Table_0_next\">下一页</a>";
					 pageInfo += "<a tabindex=\"0\" class=\"last ui-corner-tr ui-corner-br fg-button ui-button ui-state-default\" id=\"DataTables_Table_0_last\">尾页</a>";
				}
				 
				 $("#DataTables_Table_0_paginate").html(pageInfo);
				 
					}
					
			 }
		
		</script>
</body>
</html>
